﻿using Apps.Common;
using Apps.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq.Expressions;
using Apps.Models.CustomModels;

namespace Apps.IBLL.LMS
{
    public partial interface ILMS_TESTDATA_AUDITBLL
    {
        bool DELETE_LMS_AUDITDATA(ref ValidationErrors errors, string audit_id);
        bool UPDATE_LMS_AUDITDATA(ref ValidationErrors errors, V_LMS_RESULT_AUDIT model);

        string UPDATE_LMS_AUDITDATA(V_LMS_RESULT_AUDIT model);

        V_LMS_RESULT_AUDITModel GetVItem(Expression<Func<V_LMS_RESULT_AUDIT, bool>> whereLambda);
        //List<V_STATS_LMS_PLAN_RESULTModel> GetList(ref GridPager pager, string userid, string testcode,string MATERIEL_ID, string startdate, string enddate,string type, int queryState = -1);
        List<TestDataOutPutModel> GetSugarList(TestDataQuertParaModel model, ref int totalCount, bool isPage = true);
        List<V_STATS_LMS_PLAN_RESULTModel> GetList(ref GridPager pager, string userid, string testcode, string MATERIEL_ID, string startdate, string enddate, string type, int queryState = -1, string TYPE_STR = "", string batchCode = "", string BATCH_TYPE = "");
        List<V_LMS_RESULT_AUDITModel> GetList(ref GridPager pager, string userid, string testcode, string startdate, string enddate);
        List<V_LMS_RESULT_AUDITModel> GetList(ref GridPager pager, string testcode, string startdate, string enddate);
        List<V_LMS_RESULT_AUDITModel> GetList(ref GridPager pager, string testcode, string batch);
        V_LMS_RESULT_AUDITModel GetViewById(string testcode);

        List<V_RC_SAMPLING> GetChepai(string BatchCode);

        /// <summary>
        /// 获取原始数据
        /// </summary>
        /// <param name="BatchCode"></param>
        /// <returns></returns>
        List<V_LMS_TESTDATA_CONFIRMED> GetOriRecord(string testCode);

        /// <summary>
        /// 备份审核前的数据
        /// </summary>
        /// <param name="testCode"></param>
        /// <returns></returns>
        bool BeifenTestData(string testCode);

        /// <summary>
        /// 强制退回化验数据审核
        /// </summary>
        /// <param name="TestCode"></param>
        /// <returns></returns>
        string TuiHuiAuditData(string testCode);
    }
}
